# -*- coding: utf-8 -*-
from calc_setting import * 

def run_ARCH(path_file):
	ARCH_bin = os.path.join(ARCH_dir, 'bin', 'ARCH')
	result = subprocess.run([ARCH_bin, path_file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
	return(result)


if __name__ == '__main__':

	file_general_name = "path_{}.dat"
	file_name_list=Generate_General_NameList(file_general_name,ARCH_target_control_folder,param_length)
	#print(file_name_list)
	ARCH_bin = os.path.join(ARCH_dir, 'bin', 'ARCH')
	print(ARCH_bin)
	#Create_Folder_from_FileDir(ARCH_parallel_output_folder,"/")
	Create_Folder(ARCH_parallel_output_folder,"/")
	print(ARCH_parallel_output_folder)
	Parallel_Running(run_ARCH, file_name_list,ARCH_parallel_output_folder+"ARCH_{}")
